using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Player_JumpUpState : PlayerStateInAir
{
    public Player_JumpUpState(Player player, StateMachine stateMachine, string animName) : base(player, stateMachine, animName)
    {
        
    }
    public override void Enter()
    {
        base.Enter();
        player.SetVelocity(rb.velocity.x, 0);
        player.SetVelocity(rb.velocity.x, player.GetJumpForce());
    }
    public override void Update()
    {
        base.Update();
        if (rb.velocity.y < 0&&stateMachine.currentState!=player.jumpAttackState)
            stateMachine.ChangeState(player.jumpFallState);
    }
}
